-
Notifications
You must be signed in to change notification settings - Fork 153
Adding a sysbuild example #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Adding a sysbuild example #83
Conversation
This is a necessary part of the build instructions, and not immediately obvious to a new user without looking through the seperate online getting started guide. This example should serve as a "one-place" to get started. Signed-off-by: James Walmsley <[email protected]> <!-- ps-id: 7c1fc03a-7c2a-4d90-8a02-ca227114ec4e -->
Updating app to support more nucleo boards to help other's get started. Signed-off-by: James Walmsley <[email protected]> <!-- ps-id: d7fa6e3a-7de2-4bc2-8be3-dc04819fd99a -->
<!-- ps-id: 0528eaef-3719-4c12-b291-60e1cb602406 -->
b34c975
to
519a6f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I saw this on Discord and decided to drop by and share my thoughts.
Thank you for taking your time and making this. A sysbuild sample should be very useful for newcomers.
|
||
``` | ||
cd my-workspace/example-application | ||
west build --sysbuild sysbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be
west build --sysbuild sysbuild | |
west build --sysbuild sysbuild-example |
?
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
test_sysbuild() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_sysbuild() | |
test_sysbuild(REQUIRED) |
Maybe add the required flag, since the whole point is to show sysbuild?
If not, the the README should highlight what happens when building with sysbuild and when building without.
# Example Sysbuild Project | ||
|
||
The aim of this folder is to demonstrate a typical sysbuild project from the ground-up. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the example application project, we want to explain as much as possible here. We should assume that the reader knows very little about Zephyr.
I would add more text here explaining what exactly sysbuild is (link to the docs), and explain what exactly will be built, and what the expected use-case for those build targets/aretifacts is.
Then, I would highlight the command line options on how to build all of the images, only one of them, how to debug (aka the --domain
flag)
A newbie should be pointed into the correct direction, to the right docs, so they can learn further.
|
||
project(hello_world) | ||
|
||
target_sources(app PRIVATE mfg_image/src/main.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will confuse people a lot.
Both the "main"
image and the mfg_image
use the same main.c
file, and will thus print the same thing when booted.
I feel like the main image should have its own source files, so that all 3 images will do something distinct, even if it is just printing different logs. The README and possibly some comments in the code can then highlight what the images could do in a "full" implementation.
I want to create a fully fledged sysbuild example for this repo to help people get started.
I'm pushing this PR early to get some early feedback on the direction I should move this in.
The idea is to show a single sysbuild project with:
The example should show how to make different mcuboot configurations, and also show how to target different boards.